package com.qf.pojo;

public class PageBean {
    private int nowPage;
    private int rowsPerPage;
    private int rowsNum;
    private int pageNum;
    private boolean First;
    private boolean Last;
    private boolean hasPrevious;
    private boolean hasNext;

    public int getNowPage() {
        return nowPage;
    }

    public void setNowPage(int nowPage) {
        this.nowPage = nowPage;
    }

    public int getRowsPerPage() {
        return rowsPerPage;
    }

    public void setRowsPerPage(int rowsPerPage) {
        this.rowsPerPage = rowsPerPage;
    }

    public int getRowsNum() {
        return rowsNum;
    }

    public void setRowsNum(int rowsNum) {
        this.rowsNum = rowsNum;
        this.pageNum=rowsNum/rowsPerPage;
        if(rowsNum%rowsPerPage!=0){
            this.pageNum++;
        }
    }

    public int getPageNum() {
        return pageNum;
    }

/*    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }*/

    public boolean getFirst() {
        return First;
    }

    public void setFirst(boolean first) {
        this.First = first;
    }

    public boolean getLast() {
        return Last;
    }

    public void setLast(boolean last) {
        this.Last = last;
    }

    public boolean isHasPrevious() {
        return hasPrevious;
    }

    public void setHasPrevious(boolean hasPrevious) {
        this.hasPrevious = hasPrevious;
    }

    public boolean isHasNext() {
        return hasNext;
    }

    public void setHasNext(boolean hasNext) {
        this.hasNext = hasNext;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "nowPage=" + nowPage +
                ", rowsPerPage=" + rowsPerPage +
                ", rowsNum=" + rowsNum +
                ", pageNum=" + pageNum +
                ", First=" + First +
                ", Last=" + Last +
                ", hasPrevious=" + hasPrevious +
                ", hasNext=" + hasNext +
                '}';
    }
}
